package la.iok.hzsvn.lewin.movie.shopmovie.model;

import java.util.Arrays;
import java.util.Date;
import java.util.Objects;

public class CarpoolParam {
    /**
     * 版本控制。修改的时候使用
     */
    private Long version;
    /**
     * 车次标题
     */
    private String title;
    /**
     * 店铺剧本id
     */
    private Long shopMovieId;
    /**
     * 开始时间
     */
    private Date startTime;
    /**
     * 玩家数量,预计的玩家数量。选择了剧本的情况下,以剧本的玩家数量为准
     */
    private Integer playerCount;
    /**
     * 标签数组.预计的剧本标签，选择了剧本的情况下,以剧本的标签为准
     */
    private String[] tag;

    public Long getVersion() {
        return version;
    }

    public void setVersion(Long version) {
        this.version = version;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Integer getPlayerCount() {
        return playerCount;
    }

    public void setPlayerCount(Integer playerCount) {
        this.playerCount = playerCount;
    }

    public String[] getTag() {
        return tag;
    }

    public void setTag(String[] tag) {
        this.tag = tag;
    }

    public Long getShopMovieId() {
        return shopMovieId;
    }

    public void setShopMovieId(Long shopMovieId) {
        this.shopMovieId = shopMovieId;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        CarpoolParam param = (CarpoolParam) o;
        return Objects.equals(title, param.title) && Objects.equals(shopMovieId, param.shopMovieId) && Objects.equals(startTime, param.startTime) && Objects.equals(playerCount, param.playerCount) && Arrays.equals(tag, param.tag);
    }

    @Override
    public int hashCode() {
        int result = Objects.hash(title, shopMovieId, startTime, playerCount);
        result = 31 * result + Arrays.hashCode(tag);
        return result;
    }

    @Override
    public String toString() {
        return "CarpoolParam{" +
                "title='" + title + '\'' +
                ", shopMovieId=" + shopMovieId +
                ", startTime=" + startTime +
                ", playerCount=" + playerCount +
                ", tag=" + Arrays.toString(tag) +
                '}';
    }
}
